{% set clazz = "details"; %}
{% set title = "快递详情" %}
{% extends './modules/common/templates/main.html' %}
{% block style %}
  <link rel="stylesheet" href="{{ '/static/css/delivery.css'|version }}" />
{% endblock %}
{% block content %}
  {% if !nested %}
    <header class="bar bar-header">
      {{ macro.back() }}
      <h1>{{ title }}</h1>
    </header>
  {% endif %}
  <section>
  <div class="list compact overlap">
    <div class="item text-sm">
      <i class="icon">&#xe60c;</i>签收状态：<span class="text-orange">{{entity.status | statusFilter}}</span>
      <div class="text text-right text-sm">
        {% if entity.status == 2 %}
        <p class="text">{{entity.signTime | date('Y-m-d H:i:s')}}</p>
        <p class="text">{{entity.signType}}</p>
        {% endif %}
      </div>
    </div>
  </div>

  {% if entity.deliveryStatus != 10 %}
  <div class="list">
    <a class="item" href="/delivery/status/{{entity.deliveryId}}">
      <i class="icon">&#xe608;</i>
      <span class="pull-left">配送单状态追踪：</span>
      <span class="text">
        <div class="text-right">{{entity.deliveryStatus | deliveryStatusFilter}}</div>
      </span>
      <i class="icon text-gray">&#xe61a;</i>
    </a>
  </div>
  {% endif %}

  <div class="list">
    <div class="item">
      <i class="icon">&#xe612;</i>
      <div class="text text-sm">
        寄件人： 
        <span class="text text-left">{{entity.sendName || '未知'}}</span>
        <div class="text">
          <span class="text text-sm">{{entity.companyName}}：</span>
          <span class="text text-sm text-gray">{{entity.courierCode}}</span>
        </div>
      </div>
    </div>
  </div>

  <div class="list">
    <div class="item">
      <i class="icon">&#xe60d;</i>
      <div class="text text-sm">
        收货人： 
        <span class="text text-left">{{entity.receiveName}}</span>
        <span class="pull-right">{{entity.receiveMobile}}</span>
        <div class="text">
          <span class="text text-sm text-gray">{{entity.receiveAddress}}</span>
        </div>
      </div>
    </div>
  </div>
  <div class="list">
    <div class="item">
      <div class="item text-sm">
        快递重量：<span class="text-orange">{{entity.weight | weightFilter}}</span>
      </div>
    </div>
  </div>
  <div class="list">
    <div class="item">
      <div class="item text-sm">
        备注：<span class="text">{{entity.remark}}</span>
      </div>
    </div>
  </div>
  </section>
{% endblock %}
{% block script %}
  {% parent %}
  <script src="{{ '/static/js/delivery.js'|version }}"></script>
{% endblock %}